// config.h
#ifndef CONFIG_H
#define CONFIG_H

#include <QObject>
#include <QSettings>
#include <QSize>

class Config : public QObject {
    Q_OBJECT

public:
    explicit Config(QObject *parent = nullptr);
    ~Config() override;

    QSize windowSize() const { return m_windowSize; }
    void setWindowSize(const QSize &size) { m_windowSize = size; }

    int cellSize() const { return m_cellSize; }
    void setCellSize(int size) { m_cellSize = size; }

    void save();
    void load();

private:
    QSettings *m_settings;
    QSize m_windowSize;
    int m_cellSize;

    void initDefaults();
};

#endif // CONFIG_H
